package cardmanager.enums;

public enum CardRace { Aqua(0x40),Beast(0x4000),BeastWarrior(0x8000),Dinosaur(0x10000),
DivineBeast(0x200000),Dragon(0x2000),Fairy(4),Fiend(8),Fish(0x20000),Insect(0x800),
Machine(0x20),Plant(0x400),Psychic(0x100000),Pyro(0x80),Reptile(0x80000),Rock(0x100),
SeaSerpent(0x40000),SpellCaster(2),Thunder(0x1000),Warrior(1),WingBeast(0x200),Zombie(0x10);
private int value;

private CardRace(int value) 
{
        this.value = value;
}
public int getValue()
{
	return value;
}
public static CardRace fromInt(int code) {
	
	switch(code) 
	{
		case 0x40:
			return Aqua;
		case 0x4000:
			return Beast;
		case 0x8000:
			return BeastWarrior;
		case 0x10000:
			return Dinosaur;
		case 0x200000:
			return DivineBeast;
		case 0x2000:
			return Dragon;
		case 4:
			return Fairy;
		case 8:
			return Fiend;
		case 0x20000:
			return Fish;
		case 0x800:
			return Insect;
		case 0x20:
			return Machine;
		case 0x400:
			return Plant;
		case 0x100000:
			return Psychic;
		case 0x80:
			return Pyro;
		case 0x80000:
			return Reptile;
		case 0x100:
			return Rock;
		case 0x40000:
			return SeaSerpent;
		case 2:
			return SpellCaster;
		case 0x1000:
			return Thunder;
		case 1:
			return Warrior;
		case 0x200:
			return WingBeast;
		case 0x10:
			return Zombie;
		}
	return null;
}

}